//
//  MusicErchTableViewCell.m
//  ManSavour
//
//  Created by dllo on 15/10/6.
//  Copyright (c) 2015年 刘志强. All rights reserved.
//

#import "MusicErchTableViewCell.h"

@implementation MusicErchTableViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
//  [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(changeColor:) name:@"changeColor" object:nil];
        

        [self creat];
    }
    return self;
}

- (void)creat
{

    
    
    
    
    self.picView = [[UIImageView alloc]init];
    [self.picView initWithRect:0 andY:0 andWidth:375 andheight:200];
    self.picView.userInteractionEnabled = YES;
    [self.contentView addSubview:self.picView];
    
    UIView *myV =[[UIView alloc]init];
    myV.backgroundColor =[UIColor blackColor];
    [myV initWithRect:0 andY:178 andWidth:375 andheight:22];
    myV.alpha = 0.4;
    [self.contentView addSubview:myV];
    self.nameLabel = [[UILabel alloc]init];
    [self.nameLabel initWithRect:0 andY:0 andWidth:375 andheight:20];
    
    self.nameLabel.userInteractionEnabled = YES;
    [myV addSubview:self.nameLabel];
    
    

}


- (void)setModel:(MusicErchData *)model
{

        _model  = model;
   
    self.nameLabel.text = model.name;
    self.nameLabel.textColor = [UIColor whiteColor];
    NSURL *urlstr = [NSURL URLWithString:model.pic];
    [self.picView sd_setImageWithURL:urlstr placeholderImage:[UIImage imageNamed:@"placehold"]];
}













@end
